#ifndef DATA_H_
#define DATA_H_

#include <string>

#include "Typedefs.h"


class Data
{
private:
	Mat		mat_;
	Mat		mat_transpose_;

	vector<t_int>	vect_;
	t_uint		m_;	// second dimension => rows
	t_uint		n_;	// first dimension => columns

	//on peut supprimer ? voir data.cpp pour les getRows et getColumns
	//t_uint       	columns;
	//t_uint      	rows;

public:
	// Constructor
	Data(string FileName);

	// Destructor
	~Data();

	t_uint getM() const;
	t_uint getN() const;
	t_uint getRows() const;
	t_uint getColumns() const;
	const Mat& getMat() const;
	const Mat& getMatTranspose() const;
	const Vect& getVect() const;
	//getElt access first by number of row then by number of column
	inline const t_int& getElt(int i, int j) const;

	inline const t_int & GetRowMajor(size_t row, size_t col) const;
	inline const t_int & GetColMajor(size_t row, size_t col) const;

	void dispMat();
	void dispVect();

};

inline const t_int& Data::getElt(int i, int j) const
{
	return mat_[i][j];
}

inline const t_int & Data::GetRowMajor(size_t row, size_t col) const
{
	return vect_[row * n_ + col];
};

inline const t_int & Data::GetColMajor(size_t row, size_t col) const
{
	return vect_[col * m_ + row];
};

#endif	/*DATA_H_ */
